<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>首页</title>
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/index.css">
</head>
<body>
<header>
    <div class="header_conter" id="userInfo">
        <div class="title">
            CAAE基金申报管理系统
        </div>
        <div class="nav_box">
            <ul>
                <li class="active">
                    <a href="./index.html">
                        <img class="icon" src="./img/nav_index_active.png" alt="">
                        <p class="nav_title">首页</p>
                    </a>
                </li>
                <li>
                    <a href="./state.html">
                        <img class="icon" src="./img/nav_jd.png" alt="">
                        <p class="nav_title">项目进度</p>
                    </a>
                </li>
                <li>
                    <a href="./opinion.html">
                        <img class="icon" src="./img/nav_yjfk.png" alt="">
                        <p class="nav_title">意见反馈</p>
                        <span class="chat_num" v-show="num > 0" >{{num}}</span>
                    </a>
                </li>
                <li>
                    <a href="./declare.html">
                        <img class="icon" src="./img/nav_sbjl.png" alt="">
                        <p class="nav_title">申报记录</p>
                    </a>
                </li>
            </ul>
        </div>

        <div class="user_box">
            <img class="user_tx" src="./img/tx.png" alt="">
            <p>{{userName}}</p>
            <p style="color: blue; cursor:pointer;" @click="loginOut">退出</p>
        </div>
        
    </div>

</header>



<div class="content_box">
    <!-- <a href="./note.html"> -->
        <div class="top_text_box">
        1、年度内每人仅限申报一项基金；<br>
        2、既往申报的基金结题后，方可申报新的基金；<br>
        3、同一项基金限申报1次 ； （举例：既往接受过UCB科研基金项目资助，不能再次申报此项目，可以申报其他基金项目。） <br>
        <!-- 4、不同项基金限申报2项 ； （举例：申报了UCB科研基金，还可以申报“新锐酮学”项目）<br> -->
        </div>
    <!-- </a> -->
    
    

</div>

<div class="p_box" id="index">
        
    <a :class="item.bg" v-for="item in data" @click="jump(item.id,item.is_submit)">
        <div class="p_title">{{item.name}}</div>
        <div class="p_time">项目执行时间：{{item.projectExecutionTimeOver}}年</div>
        <div class="p_sqtime">申报时间：{{item.declarationTimeBegins}} 至 {{item.declarationTimeOver}}</div>
    </a>

</div>

<div style="color:#666; text-align: center; margin-bottom: 30px;">
    <p style="margin-bottom: 0px;">  中国抗癫痫协会秘书处联系电话：010-68308546 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail：office@caae.org.cn <br>
         地址：北京市西城区西直门外大街135号北展宾馆二号楼5102室&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </p>
</div>

<script type="text/javascript" src="./js/vue.js"></script>
<script type="text/javascript" src="./js/axios.min.js"></script>
<script type="text/javascript" src="./js/config.js"></script>
<script type="text/javascript" src="./js/info.js"></script>


<script>

    const indexapp = new Vue({
    el: "#index",
    data: {
        data:[

        ],
    },

    methods: {
        // 方法列表
        jump(id,submit){

            if (submit == 1) {
                console.log(submit);
                window.location.href = "./state.html";
            }else{
                window.location.href = "./note.html?id=" + id;
            }
            
        }

    },
    created:function(){

        if (localStorage.getItem("loginId")) {
            var that = this;
            axios.get(BaseUrl + "client/fund/fundList?loginId=" + localStorage.getItem("loginId")).then(
                function(response) {
                // console.log(response.data.data);
                    let data = response.data.data;
                    data.forEach((item,i) => {
                        item.bg = "p_item " + "bj" + item.id;
                        console.log(item.bg);
                    })
                    that.data = response.data.data;
                    console.log(that.data);
                },
                function(err) {}
            );
        }else{
            window.location.href = "./login.html";
        }

        
    },
    });






</script>


</body>


</html>